package nowcoder.meituan;

import java.util.Scanner;

public class TestCode1 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(getOrigin(s));
    }

    private static String getOrigin(String s){
        char[] c = s.toCharArray();
        StringBuilder sb = new StringBuilder();
        char pre = '.';
        for(int i = 0; i < c.length; i++){
            if(c[i] != pre && c[i] != ' '){
                sb.append(c[i]);
                pre = c[i];
            }
        }
        return sb.toString();
    }
}
